package cn.wolfcode.luowowo.comment.domain;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Setter
@Getter
@Document("scenic_comment")   //文档所在集合名字
public class ScenicComment implements Serializable{

    @Id
    private String id;

    private Long userId; //评论人id

    private String userName;//评论人name

    private String userImg;//评论人头像

    private Long userLv;//评论人等级

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date creatTime;//评论时间

    private Long scenicId;//景点id

    private String scenicName;//景点name

    private Long rank;//总体评价

    private Long sceneRank;//风光评价

    private Long featureRank;//特色评价

    private Long serviceRank;//服务评价

    private String comment;//评论

    private int thumbupnum;     //点赞数

    private String comImg; //评论图片

    private String scenicImg; //景点第一张图片

    private List<Long> thumbuplist = new ArrayList<>();  //点赞用户id集合

    private List<ScenicComment> sc = new ArrayList<>();//评论人的集合

}